// 导入自己需要的组件
import Vue from 'vue'
import { 
    Button,
    Select, 
    Option, 
    OptionGroup,
    Input, 
    Tree, 
    Dialog, 
    Row, 
    Col, 
    Upload,
    Progress,
    Switch,
    Menu,
    Submenu,
    MenuItem,
    MenuItemGroup, 
    Icon,
    DatePicker,
    TimeSelect,
    TimePicker,
    Table,
    TableColumn,
    Pagination,
    Loading,
    Dropdown,
    DropdownMenu,
    DropdownItem,
    MessageBox,
    Message,
    Notification,
    Tabs,
  	TabPane,
  	Radio,
    RadioGroup,
    RadioButton,
    Checkbox,
    CheckboxButton,
    CheckboxGroup,
 	Form,
    FormItem,
    Image,
    Timeline,
    TimelineItem,
    Card,
} from 'element-ui'

const element = {
    install: function (Vue) { //install 方法表示在 main.js 中，如果使用 Vue.use() 方法的话，则该方法默认会调用 install 方法
        Vue.use(Button)
        Vue.use(Select)
        Vue.use(Option)
        Vue.use(OptionGroup)
        Vue.use(Input)
        Vue.use(Tree)
        Vue.use(Dialog)
        Vue.use(Row)
        Vue.use(Col)
        Vue.use(Upload)
        Vue.use(Progress)
        Vue.use(Switch)
        Vue.use(Menu)
        Vue.use(Submenu)
        Vue.use(MenuItem)
        Vue.use(MenuItemGroup)
        Vue.use(Icon)
        Vue.use(DatePicker)
        Vue.use(TimeSelect)
        Vue.use(TimePicker)
        Vue.use(Table)
        Vue.use(TableColumn)
        Vue.use(Pagination)
        Vue.use(Loading.directive);
        Vue.use(Dropdown)
        Vue.use(DropdownMenu)
        Vue.use(DropdownItem)
        Vue.use(Tabs)
        Vue.use(TabPane)
        Vue.use(Radio)
        Vue.use(RadioGroup)
        Vue.use(RadioButton)
        Vue.use(Checkbox)
        Vue.use(CheckboxButton)
        Vue.use(CheckboxGroup)
        Vue.use(Form)
        Vue.use(FormItem)
        Vue.use(Image)
        Vue.use(Timeline)
        Vue.use(TimelineItem)
        Vue.use(Card)
    }
}

Vue.prototype.$loading = Loading.service;
Vue.prototype.$message = Message;
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$notify = Notification;


export default element